home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 422_01 / emily52.doc < prev    next >
Encoding:
Text File  |  1994-03-21  |  35.0 KB  |  788 lines

  1.        
  2.        
  3.        
  4.        
  5.        
  6.        
  7.        
  8.        
  9.        
  10.        
  11.        
  12.        
  13.        ==================================================================
  14.        EEEEEEE  MM   MM  IIIIIII  L       Y     Y        5555555   22222
  15.        E        M M M M     I     L        Y   Y         5        2     2
  16.        E        M  M  M     I     L         Y Y          555555         2
  17.        EEEE     M     M     I     L          Y     ---         5   22222
  18.        E        M     M     I     L          Y                 5  2
  19.        E        M     M     I     L          Y           5     5  2
  20.        EEEEEEE  M     M  IIIIIII  LLLLLLL    Y            55555   2222222
  21.        ==================================================================
  22.     
  23.     
  24.     
  25.     
  26.     
  27.                                        A
  28.                                Simulator/Emulator
  29.                                     for the
  30.                                  8051 and 8052
  31.     
  32.     
  33.     
  34.     
  35.     
  36.                                   Release 1.3
  37.     
  38.                                Revised 04-Jan-94
  39.     
  40.     
  41.     
  42.     
  43.     
  44.     
  45.     
  46.     
  47.     
  48.     
  49.     
  50.     
  51.     
  52.     
  53.     
  54.                        Copyright 1991-1994 Dave Dunfield
  55.                               All rights reserved
  56.     EMILY: An 8051/52 simulator                                      Page: 1
  57.  
  58.  
  59.     1. INTRODUCTION
  60.     
  61.           EMILY is a software simulator for the 8051 and  8052  families  of
  62.        processors. It provides a powerful  debugging  environment,  offering
  63.        many features:
  64.     
  65.        - Supports full 64K of PROGRAM and  64K  of  DATA  memory.  DATA  and
  66.          PROGRAM memory may also be overlapped into  a  single  64K  address
  67.          space.
  68.     
  69.        - Hardware emulation mode communciates with the  target  system,  and
  70.          allows you to include the physical I/O lines, timers etc.  in  your
  71.          simulation.
  72.     
  73.        - Single step, Multi Step, Animate and Full Speed execution modes.
  74.     
  75.        - Simultanious on-screen displays of  program  disassembly,  internal
  76.          memory, CPU registers and simulation messages.
  77.     
  78.        - Full screen editors for CPU registers, Special  Function  Registers
  79.          (SFR's), and each of the INTERNAL, EXTERNAL DATA and PROGRAM memory
  80.          spaces. All of the above may be viewed/altered at any  time  during
  81.          the debugging session.
  82.     
  83.        - Multiple breakpoints are transparent to the user program.
  84.     
  85.        - Supports the additional SFR's and internal RAM of the 8052 series.
  86.     
  87.        1.1 System Requirements
  88.     
  89.              EMILY will run on any IBM PC/AT/PS2 compatible  system  with  a
  90.           MDA/CGA/EGA or VGA display, two COMM ports, and at least  192K  of
  91.           free system RAM.
  92.     
  93.           - If hardware emulation or serial I/O are not used, only one  COMM
  94.             port is required.
  95.     
  96.           - If Overlapped data/program memory is used, only 128K of free ram
  97.             is required.
  98.     
  99.           - Some CGA displays may exibit "snow" or flicker during high speed
  100.             screen updates. This effect will not occur with MDA, EGA or  VGA
  101.             displays.
  102.     EMILY: An 8051/52 simulator                                      Page: 2
  103.  
  104.  
  105.     2. STARTING UP EMILY
  106.     
  107.           If you are using the optional hardware emulation mode, insure that
  108.        the resident control software (supplied) is inserted into the  target
  109.        system, and that the PC running EMILY  is  connected  to  the  target
  110.        systems serial port  via  COM2.  Power  on  the  test  system  before
  111.        starting EMILY. The resident control software  must  be  active  when
  112.        EMILY "looks" for it.
  113.     
  114.           EMILY is invoked by typing her name at the DOS command  line.  You
  115.        will be greeted with a "welcome" screen which displays a reminder  of
  116.        the command line syntax and the copyright message. This  screen  will
  117.        remain on the display for about 5 seconds (10  seconds  in  the  demo
  118.        version). Pressing any key while this screen is visible  will  bypass
  119.        this delay, and proceed directly to the main control panel.
  120.     
  121.           If EMILY is given a file name on the command line, she loads it in
  122.        the same manner as if the 'L'oad command had been  used  from  within
  123.        the main control panel.
  124.     EMILY: An 8051/52 simulator                                      Page: 3
  125.  
  126.  
  127.           EMILY also accepts several option switches on the command line:
  128.     
  129.             /Hardware[:n]  - Enables the hardware emulation feature to cause
  130.                              EMILY to interact with the target  system  when
  131.                              performing I/O accesses.  This  option  may  be
  132.                              followed by a  ':'  and  a  numeric value which
  133.                              defines the BAUD RATE to be used to communicate
  134.                              with the target system. Default is 28800.
  135.     
  136.             /Mono *        - Inhibits the  color display, even  if  a  color
  137.                              adapter is present. This option may  be  useful
  138.                              if your monitor/adapter combination provides an
  139.                              unpleasent or unusable display for EMILY.
  140.     
  141.             /Overlap       - Joins EXTERNAL DATA  and PROGRAM  memory into a
  142.                              single 64K address space which can be  accessed
  143.                              with either MOVX or MOVC. This is equivalent to
  144.                              a hardware implementation in which the PSEN and
  145.                              RD signals are ANDed together.
  146.     
  147.             /Reset         - Causes EMILY to de-assert the RTS line when she
  148.                              initializes the serial port. This option may be
  149.                              required when using  EMILY  with older versions
  150.                              of our "BD52" single board computer.
  151.     
  152.             /Swapcom       - Exchanges the operation of the two serial ports
  153.                              on the PC.  When this option is used, COM1 will
  154.                              be used to communicate with the  target system,
  155.                              and COM2 is used for serial I/O redirection.
  156.     
  157.         * Note: If some of the EMILY windows appear  to  be  an  un-readable
  158.                 washed-out yellow color, try adjusting the color contrast on
  159.                 your monitor. Those windows should be an easy to read brown.
  160.     
  161.           If you are using the '/Hardware' option, and EMILY  is  unable  to
  162.        establish communication with the target system, you will see an error
  163.        message flashing on the screen. EMILY will keep trying, allowing  you
  164.        to debug the connection. You may also press the ESCAPE key to disable
  165.        hardware emulation, and proceed with a software only simulation.
  166.     EMILY: An 8051/52 simulator                                      Page: 4
  167.  
  168.  
  169.     3. USING EMILY
  170.     
  171.        3.1 The Main Control Panel
  172.     
  173.              Once EMILY is up and running, you will be  presented  with  the
  174.           "Main Control Panel", which consists of four "windows" displaying:
  175.     
  176.             - A disassembly of program memory       (Upper LEFT)
  177.             - The contents of CPU registers         (Upper CENTER)
  178.             - The contents of INTERNAL MEMORY       (Upper RIGHT)
  179.             - Informational messages from EMILY     (Lower portion)
  180.     
  181.              All of EMILY'S functions are  accessed  by  command  characters
  182.           entered from this screen:
  183.     
  184.           3.1.1 A - Animate execution
  185.     
  186.                 This function begins execution of the user program (from the
  187.              address in the PC register). As each instruction  is  executed,
  188.              EMILY will display the  instruction  being  executed,  the  CPU
  189.              registers, and the contents of internal RAM in the  appropriate
  190.              windows.
  191.     
  192.                 When you enter the 'A' command, EMILY will  prompt  you  for
  193.              the number of instructions to animate. Pressing return (without
  194.              entering  a  number)  will  cause  the  animation  to   proceed
  195.              non-stop. Pressing <escape> will return you to the Main Control
  196.              Panel.
  197.     
  198.              The animation will terminate when:
  199.     
  200.                 - The requested number of instructions have been stepped.
  201.                 - A breakpoint is encountered.
  202.                 - The illegal opcode ($A5) is encountered.
  203.                 - The <escape> key is pressed on the PC console.
  204.     
  205.           3.1.2 B - set Breakpoint
  206.     
  207.                 This command sets a breakpoint such that  program  execution
  208.              under the 'A'nimate, or  'G'o,  commands  will  stop  when  the
  209.              breakpoint address is encountered.
  210.     
  211.                 Up to 10 breakpoints may be in effect at the same time.
  212.     
  213.                 You will be prompted for  the  address  (in  HEX).  Pressing
  214.              return (without entering an address) will cause the  breakpoint
  215.              to be  set  at  the  current  program  counter  (PC)  location.
  216.              Pressing <escape> will return you to the main control panel.
  217.     
  218.                 EMILY stores the breakpoint addresses internally in a simple
  219.              zero terminated list. This allows  her  to  avoid  searching  a
  220.              fixed size table, and helps  speed  up  the  operation  of  the
  221.              program, especially when there are few breakpoints.  This  does
  222.              however cause the restriction that you cannot set a  breakpoint
  223.              at address zero ($0000).
  224.     EMILY: An 8051/52 simulator                                      Page: 5
  225.  
  226.  
  227.           3.1.3 C - Change register
  228.     
  229.                 You will be prompted for the CPU register to change. Enter a
  230.              character from the following list, ESCAPE to abort, or F1 for a
  231.              reminder:
  232.     
  233.                 A   - A accumulator
  234.                 B   - B accumulator
  235.                 D   - Data pointer (DPTR)
  236.                 S   - Stack pointer
  237.                 P   - Program counter
  238.                 W   - processor status Word
  239.                 0-7 - general register 0-7
  240.     
  241.                 After you have selected the register, you will  be  prompted
  242.              for the new contents (in HEX).
  243.     
  244.           3.1.4 D - edit Data memory
  245.     
  246.                 This command allows you to edit EXTERNAL DATA  memory  using
  247.              EMILY's  built  in  memory  editor.  See  the  "Memory  Editor"
  248.              section.
  249.     
  250.           3.1.5 F - display/edit special Function registers
  251.     
  252.                 The names and contents of all SFR's are displayed in a menu.
  253.              To change a register, enter the character preceeding  the  ':',
  254.              immediately to the left of its name. You will be  prompted  for
  255.              its new contents.
  256.     
  257.                 If multiple columns of SFR's are  defined,  use  <space>  to
  258.              select the column to edit.
  259.     
  260.                 When debugging  with  the  hardware  emulation  option,  the
  261.              values read/and written to the SFR's will  reflect  the  actual
  262.              state of the hardware lines etc. on the  target  system  board.
  263.              Pressing any key while in this menu will refresh  the  display,
  264.              and make visible any changes which have occured on  the  target
  265.              system I/O lines etc.
  266.     
  267.                 When debugging without the hardware emulator  option,  SFR's
  268.              are simply stored internaly within EMILY's memory.
  269.     EMILY: An 8051/52 simulator                                      Page: 6
  270.  
  271.  
  272.           3.1.6 G - Go: execute program
  273.     
  274.                 This  function  begins  high-speed  execution  of  the  user
  275.              program (from the address in the PC register).
  276.     
  277.                 When you enter the 'G' command, EMILY will  prompt  you  for
  278.              the number of instructions to execute. Pressing return (without
  279.              entering a number) will cause the program to proceed  non-stop.
  280.              Pressing <escape> will return you to the Main Control Panel.
  281.     
  282.              Program execution will terminate when:
  283.     
  284.                 - The requested number of instructions have been executed.
  285.                 - A breakpoint is encountered.
  286.                 - The illegal opcode ($A5) is encountered.
  287.                 - The <escape> key is pressed on the PC console. *
  288.     
  289.              * NOTE: If you are using 'Local' serial I/O mode, ESCAPE offers
  290.              you a menu of execution I/O functions. See the F3  command  for
  291.              more information.
  292.     
  293.           3.1.7 I - edit Internal memory
  294.     
  295.                 This command  allows  you  to  edit  INTERNAL  memory  using
  296.              EMILY's  built  in  memory  editor.  See  the  "Memory  Editor"
  297.              section.
  298.     
  299.           3.1.8 J - Jump to PC
  300.     
  301.                 This command re-positions the disassembly display window (if
  302.              necessary) to display the instruction addressed by the  current
  303.              CPU Program Counter (PC).
  304.     
  305.           3.1.9 K - Kill all breakpoints
  306.     
  307.                 Removes ALL breakpoints after prompting for permission to do
  308.              so.
  309.     
  310.           3.1.10 L - Load program image
  311.     
  312.                 Prompts for the name of a file, and loads  it  into  PROGRAM
  313.              memory. The file must  be  in  either  INTEL  or  MOTOROLA  hex
  314.              download format.
  315.     
  316.           3.1.11 N - Next disassembly window
  317.     
  318.                 Advances the disassembler to display the  following  screen.
  319.              Subsequent 'N' commands  will  proceed  to  disassemble  higher
  320.              memory addresses.
  321.     
  322.           3.1.12 P - edit Program memory
  323.     
  324.                 This command allows you to edit PROGRAM memory using EMILY's
  325.              built in memory editor. See the "Memory Editor" section.
  326.     EMILY: An 8051/52 simulator                                      Page: 7
  327.  
  328.  
  329.           3.1.13 R - Remove a breakpoint
  330.     
  331.                 Prompts for the address, and if a breakpoint is set at  that
  332.              address, it is removed. Pressing return  (without  entering  an
  333.              address) will remove the  breakpoint  at  the  current  program
  334.              counter (PC) location.
  335.     
  336.           3.1.14 T - Traceback viewer
  337.     
  338.                 In all execution modes, EMILY keeps track of the  last  4095
  339.              instructions executed. By entering the  traceback  viewer,  you
  340.              can examine this recording, and determine program  activity  up
  341.              to 4095 instructions preceeding the one on which execution last
  342.              stopped.
  343.     
  344.                 The following command keys are available in the viewer:
  345.     
  346.                 Up   - Backup the display 1 instruction.
  347.                 Down - Advance the display 1 instruction.
  348.                 PgUp - Backup the display 50 instructions.
  349.                 PgDn - Advance the display 50 instructions.
  350.                 Home - Position to the beginning of recording.
  351.                 End  - Position to the end of recording.
  352.                 F1   - Display a help summary.
  353.                 F2   - Prompt for position & move.
  354.                 F3   - Search backward (in time) for address. *
  355.                 F4   - Search forward  (in time) for address. *
  356.                 Esc  - Exit the Traceback viewer.
  357.     
  358.               * If you press <return> without entering an address, the search
  359.                 commands will look for the previous or next instance of the
  360.                 instruction at your current position in the traceback buffer.
  361.     
  362.                 Only the instruction executed  is  saved  in  the  traceback
  363.              viewer, the contents of registers, RAM etc. are not recorded.
  364.     
  365.                 The instruction at position 0 in the traceback buffer is the
  366.              one to which the current  PC  points,  and  has  not  yet  been
  367.              executed.
  368.     
  369.           3.1.15 V - Vector to interrupt
  370.     
  371.                 This function prompts you with a menu of the available  8052
  372.              interrupts. Use the arrow keys to position the  cursor  bar  to
  373.              the interrupt you desire to simulate, and press ENTER to select
  374.              it. You may use ESCAPE to cancel the function and return to the
  375.              Main Control Panel.
  376.     
  377.                 EMILY will simulate a long call (LCALL) to the corresponding
  378.              interrupt vector address by saving the current Program  Counter
  379.              on the CPU stack, and reloading it with  the  vector.  Any  SFR
  380.              bits normally set when the particular interrupt occurs will  be
  381.              set at this time.
  382.     EMILY: An 8051/52 simulator                                      Page: 8
  383.  
  384.  
  385.           3.1.16 F1 - Help display
  386.     
  387.                 Pressing this key displays a summary of the  EMILY  commands
  388.              which are available from the Main Control Panel.
  389.     
  390.           3.1.17 F2 - Set Disassembler Address
  391.     
  392.                 Prompts for  an  address  (in  HEX),  and  re-positions  the
  393.              disassembler window to display instructions beginning  at  that
  394.              address.
  395.     
  396.           3.1.18 F3 - Setup Serial Port
  397.     
  398.                 Opens a window displaying the (B)audrate,  (P)arity,  (D)ata
  399.              bits and (S)top bits which are  currently  configured  for  the
  400.              PC's COM1 serial port.
  401.     
  402.                 Press B, P, D or S to cycle to the next corresponding entry.
  403.     
  404.                 When Baudrate is selected as 'Local', EMILY  will  re-direct
  405.              the  programs  serial  accesses  to  the  message  window.  Any
  406.              characters which are written to SBUF  will  be  output  in  the
  407.              message window, and  any  character  which  are  typed  at  the
  408.              keyboard will appear as incomming serial data. When  this  mode
  409.              is active, Pressing ESCAPE in the 'G'o command brings up a menu
  410.              of execution options:
  411.     
  412.                 End simulation  - Stops the 'G'o command.
  413.                 Send ESCAPE     - Send ESCAPE through as a charcter.
  414.                 Zoom window     - Switch to full screen I/O window.
  415.     
  416.                 If 'Local' is not selected, EMILY  re-directs  the  programs
  417.              serial accesses to the PC's  COM1  serial  port,  however,  for
  418.              maximum  flexibility,  the  actual  data  format  used  may  be
  419.              configured by this menu.
  420.     
  421.                 EMILY allows you to "fine tune" a baud rate,  by  using  the
  422.              Up/Down keys. Note that the  available  baud  rate  values  are
  423.              determined by the PC COMM  port  hardware,  and  may  not  fall
  424.              exactly on the value you wish to use.
  425.     
  426.                 Asynchronous communication is specified to work properly  as
  427.              long as the device is operating within 5% of the intended  baud
  428.              rate.
  429.     
  430.                 For example:
  431.     
  432.                         Desired baud rate       : 1500
  433.                         Allowable range (+/- 5%): 1425-1575
  434.                         Closest PC baud rate    : 1496
  435.     
  436.                 In the above example, the baud rate produced is within  0.3%
  437.              of  the  desired  value,   and   is   therefore   well   within
  438.              specifications.
  439.     EMILY: An 8051/52 simulator                                      Page: 9
  440.  
  441.  
  442.           3.1.19 <space> - Single step one instruction
  443.     
  444.                 Every time you press the <space> bar, EMILY will execute one
  445.              instruction, and update the on-screen displays.
  446.     
  447.           3.1.20 PgDn - Advance IRAM display page
  448.     
  449.                 Pressing this  key  advances  the  internal  memory  display
  450.              window by one page (64 bytes).
  451.     
  452.           3.1.21 PgUp - Backup IRAM display page
  453.     
  454.                 Pressing this key  backs  up  the  internal  memory  display
  455.              window by one page (64 bytes).
  456.     
  457.           3.1.22 Down - Advance IRAM display line
  458.     
  459.                 Pressing the "down arrow" key advances the  internal  memory
  460.              display window by one line (4 bytes).
  461.     
  462.           3.1.23 Up - Backup IRAM display line
  463.     
  464.                 Pressing the "up arrow" key backs  up  the  internal  memory
  465.              display window by one line (4 bytes).
  466.     EMILY: An 8051/52 simulator                                      Page: 10
  467.  
  468.  
  469.        3.2 The Memory Editor
  470.     
  471.              When you activate the 'D', 'I' or 'P' commands  from  the  main
  472.           control panel, EMILY will invoke its internal "Memory  Editor"  to
  473.           access the desired memory area. When you are within  this  editor,
  474.           the following commands are available:
  475.     
  476.           3.2.1 F1 - Help display
  477.     
  478.                 Pressing this key displays a summary of the  EMILY  commands
  479.              which are available from within the Memory Editor.
  480.     
  481.           3.2.2 F2 - Set Edit Address
  482.     
  483.                 Prompts for an address (in HEX), and re-positions the editor
  484.              display and cursor to edit at that address.
  485.     
  486.           3.2.3 F3 - Toggle Edit Mode
  487.     
  488.                 EMILY allows two edit modes, HEX  and  ASCII.  When  in  HEX
  489.              mode, your cursor will be positioned in the hexidecimal display
  490.              portion of the memory  memory  dump,  allowing  you  to  change
  491.              memory by entering a new value as two  hexidecimal  characters.
  492.              When in ASCII mode, your cursor will  be  positioned  over  the
  493.              ASCII portion of the dump, and  you  can  replace  memory  with
  494.              ASCII text typed at the keyboard.
  495.     
  496.                 Pressing F3 will toggle between HEX and ASCII mode,  causing
  497.              your cursor to switch between the corresponding portion of  the
  498.              memory display.
  499.     
  500.           3.2.4 Up - Move up 1 line
  501.     
  502.                 Pressing the UP ARROW causes the cursor to move  upwards  on
  503.              the screen by one line. This reduces the memory edit address by
  504.              16 bytes.
  505.     
  506.           3.2.5 Down - Move down 1 line
  507.     
  508.                 Pressing the DOWN ARROW causes the cursor to move  downwards
  509.              on the screen by one  line.  This  increases  the  memory  edit
  510.              address by 16 bytes.
  511.     
  512.           3.2.6 Left - Move left 1 byte
  513.     
  514.                 Pressing the LEFT ARROW causes the cursor  to  move  to  the
  515.              left by one byte position. This reduces the memory edit address
  516.              by 1 byte.
  517.     
  518.                 If the cursor is already at the left hand  margin,  it  will
  519.              wrap around to the rightmost position of the previous line.
  520.     EMILY: An 8051/52 simulator                                      Page: 11
  521.  
  522.  
  523.           3.2.7 Right - Move right 1 byte
  524.     
  525.                 Pressing the RIGHT ARROW causes the cursor to  move  to  the
  526.              right by one byte position. This in increases the  memory  edit
  527.              address by 1 byte.
  528.     
  529.                 If the cursor is already at the right hand margin,  it  will
  530.              wrap around to the leftmost position of the following line.
  531.     
  532.           3.2.8 PgUp - Move back 1 page
  533.     
  534.                 Pressing the PGUP key causes the editor  to  move  back  one
  535.              display page. This reduces  the  memory  edit  address  by  256
  536.              bytes.
  537.     
  538.           3.2.9 PgDn - Move forward 1 page
  539.     
  540.                 Pressing the PGDN causes the  editor  to  move  forward  one
  541.              display page. This increases the memory  edit  address  by  256
  542.              bytes.
  543.     
  544.           3.2.10 Home - Move to start of line
  545.     
  546.                 Pressing the HOME key causes  the  cursor  to  move  to  the
  547.              leftmost position of the line it is currently on. If the cursor
  548.              was already in the  leftmost  position,  it  is  moved  to  the
  549.              leftmost position of the preceeding line.
  550.     
  551.           3.2.11 End - Move to end of line
  552.     
  553.                 Pressing the END key  causes  the  cursor  to  move  to  the
  554.              rightmost position of the line  it  is  currently  on.  If  the
  555.              cursor was already in the rightmost position, it  is  moved  to
  556.              the rightmost position of the following line.
  557.     
  558.           3.2.12 Ctrl-PgUp - Move to start of memory
  559.     
  560.                 Pressing the CTRL and  PGUP  keys  re-positions  the  editor
  561.              display and cursor to address $0000 at the start of the  memory
  562.              block.
  563.     
  564.           3.2.13 Ctrl-PgDn - Move to end of memory
  565.     
  566.                 Pressing the CTRL and  PGDN  keys  re=positions  the  editor
  567.              display and cursor to the  highest  address  available  in  the
  568.              memory block.
  569.     EMILY: An 8051/52 simulator                                      Page: 12
  570.  
  571.  
  572.        3.3 Hardware Emulation
  573.     
  574.              EMILY supports a hardware emulation mode, which provides access
  575.           to most of the physical I/O ports, timers  etc.  from  the  target
  576.           system in your simulation.
  577.     
  578.              The  target  system  must  be  running  the  supplied   control
  579.           software, which interacts with EMILY, and perform the I/O accesses
  580.           upon her commands. The serial port of the target  system  must  be
  581.           connected to the COM2 serial port of the PC.
  582.     
  583.              There are a few restrictions which apply:
  584.     
  585.              - The target system must provide access to the CPU serial port.
  586.     
  587.              - There is an approximatly 0.7 MS delay when accessing the  I/O
  588.                ports and other physical hardware. This  occurs  due  to  the
  589.                serial activity required to communicate the data to and  from
  590.                the target system.  For  most  applications,  this  delay  is
  591.                acceptable, particularly in  the  stop/start  environment  of
  592.                simulation and debugging. NOTE: If you are using  a  baudrate
  593.                to communicate with the target system which is lower than the
  594.                default (28800), this delay will be longer.
  595.     
  596.              - The control software uses TIMER1 internally to  generate  the
  597.                baud rate clock for its serial port. This means  that  TIMER1
  598.                is unavailable during the  simulation.  If  your  application
  599.                uses the serial port, we recommend you also use TIMER1 as the
  600.                baud rate generator. Since EMILY has a  separate  setup  memu
  601.                for serial port speed, parity etc. It will  not  affect  your
  602.                program that TIMER1 is disabled during the simulation. Simply
  603.                press F3 at EMILY's main control panel, and select the serial
  604.                parameters you desire.
  605.     EMILY: An 8051/52 simulator                                      Page: 13
  606.  
  607.  
  608.              When using this  (Hardware  Emulation)  feature,  the  Resident
  609.           Control Firmware should be running in  the  target  system  BEFORE
  610.           executing EMILY. Be sure to specify '/H:<speed>' parameter on  the
  611.           command line when starting EMILY.
  612.     
  613.              The value of <speed> depends on the  target  systems  operating
  614.           frequency. The following table shows the speeds which can be  used
  615.           with several common  crystal  frequencies  without  modifying  the
  616.           supplied Resident Control Firmware:
  617.     
  618.                     Freq (Mhz)          Speed -> Actual
  619.                     ----------------------------------------
  620.                     11.0592             28800 -> 28800  0.0%
  621.                     11.0                28646 -> 28800  0.5%
  622.                     9.0                 23438 -> 23040  1.7%
  623.                     7.3728              19200 -> 19200  0.0%
  624.                     5.0                 13020 -> 12800  1.7%
  625.                     4.0                 10417 -> 10473  0.5%
  626.                     3.68                9600  -> 9600   0.0%
  627.                     3.59                9349  -> 9600   2.7%
  628.                     3.0                 7813  -> 7680   1.7%
  629.                     2.0                 5208  -> 5236   0.5%
  630.                     1.84                4800  -> 4800   0.0%
  631.                     1.0                 2604  -> 2618   0.5%
  632.     
  633.              At the beginning of the supplied KERNAL.ASM  file  is  a  large
  634.           comment which describes how to change the baud  rate  constant  to
  635.           obtain other serial port speeds. The following table shows  speeds
  636.           which can  be  used  with  other  common  crystal  frequencies  by
  637.           altering the "BAUD" value in the KERNAL.ASM file:
  638.     
  639.                 Freq (Mhz)  BAUD Value      Speed -> PC Speed
  640.                 ------------------------------------------------
  641.                 12.0            3           10417 -> 10473  0.5%
  642.                 10.0            2           13020 -> 12800  1.7%
  643.                 8.0             2           10417 -> 10473  0.5%
  644.                 7.0             2           9116  -> 8862   2.8%
  645.                 6.0             2           7813  -> 7680   1.7%
  646.     EMILY: An 8051/52 simulator                                      Page: 14
  647.  
  648.  
  649.        3.4 Messages
  650.     
  651.              During the course of operation, EMILY may display the following
  652.           messages in the message window located in the lower portion of the
  653.           screen:
  654.     
  655.           3.4.1 All Used!
  656.     
  657.                 You have tried to enter a  breakpoint,  when  all  available
  658.              breakpoints are in use. EMILY allows up to 10 code  breakpoints
  659.              to be active at any one time.
  660.     
  661.           3.4.2 Animating at XXXX
  662.     
  663.                 Indicates that EMILY has  commenced  animated  execution  of
  664.              your program, beginning at the address 'XXXX'.
  665.     
  666.           3.4.3 Already set!
  667.     
  668.                 Issued to indicate that the address at which you have  tried
  669.              to set a breakpoint is already active as a breakpoint.
  670.     
  671.                 This message will also  result  of  you  attempt  to  set  a
  672.              breakpoint at address zero ($0000).
  673.     
  674.           3.4.4 Breakpoints: [XXXX ...]
  675.     
  676.                 This message shows the currently set  breakpoint  addresses,
  677.              and is issued whenever any  command  involving  breakpoints  is
  678.              performed.
  679.     
  680.           3.4.5 Executing at XXXX
  681.     
  682.                 Indicates that EMILY has commenced full  speed  exection  of
  683.              your program, beginning at the address 'XXXX'.
  684.     
  685.           3.4.6 Code and data are overlapped
  686.     
  687.                 This message results from the use of the  '/Overlap'  switch
  688.              on the EMILY command line, and indicates that the external CODE
  689.              and DATA memory address  spaces  are  combined  into  a  single
  690.              overlapping 64K segment.
  691.     
  692.           3.4.7 Code and data are separate
  693.     
  694.                 Indicate that EMILY  has  established  separate  64K  memory
  695.              address spaces for the code and data, resulting in  128K  total
  696.              external memory.
  697.     
  698.           3.4.8 FILENAME: Bad checksum
  699.     
  700.                 EMILY  has  encountered  a  record  containing  a  incorrect
  701.              checksum value while attempting to 'L'oad the named file.
  702.     EMILY: An 8051/52 simulator                                      Page: 15
  703.  
  704.  
  705.           3.4.9 FILENAME: Demo limit exceeded!
  706.     
  707.                 This message occurs only in the "Demonstration"  version  of
  708.              EMILY, and indicates that you have  attempted  to  'L'oad  more
  709.              than 500 bytes of code. The demonstration release  is  intended
  710.              only to allow you to  check  out  EMILY's  features,  you  must
  711.              purchase the "production" version if  you  intend  to  use  the
  712.              program for serious development and debugging.
  713.     
  714.           3.4.10 FILENAME: Invalid HEX record
  715.     
  716.                 EMILY  has  encountered  an  improperly  formatted  download
  717.              record while attempting to 'L'oad the named file.
  718.     
  719.           3.4.11 FILENAME: N bytes loaded
  720.     
  721.                 The  indicated  number  of  bytes  have  been   successfully
  722.              'L'oaded from the named file.
  723.     
  724.           3.4.12 FILENAME: Unable to access
  725.     
  726.                 EMILY was unable to open and read the named file.
  727.     
  728.           3.4.13 Hardware emulation is disabled
  729.     
  730.                 Indicates that the EMILY  is  running  as  a  software  only
  731.              simulator, and will emulate special  functions  registers  etc.
  732.              using internal RAM memory.
  733.     
  734.           3.4.14 Hardware emulation is enabled
  735.     
  736.                 Issued if the "/Hardware"  switch  was  used  on  the  EMILY
  737.              command line, and the Resident Control Software in  the  target
  738.              system has been detected. In this mode  of  operation,  special
  739.              function register accesses  are  communicated  to  the  control
  740.              software, and result in physical activity on the target system.
  741.     
  742.           3.4.15 Stopped at XXXX
  743.     
  744.                 Indicates that EMILY has stopped execution of you program at
  745.              the indicated address. This message is appended to the  initial
  746.              message indicating that execution had commenced.
  747.     
  748.           3.4.16 Target system is not responding!!!
  749.     
  750.                 Indicates that the "/Hardware" option switch was used on the
  751.              EMILY command line, but EMILY  cannot  establish  communication
  752.              with the target system. EMILY will keep trying, allowing you to
  753.              attempt to debug the connection. You may also press the  ESCAPE
  754.              key, to disable hardware emulation mode,  and  proceed  with  a
  755.              software only simulation.
  756.     EMILY: An 8051/52 simulator                                      Page: 16
  757.  
  758.  
  759.           3.4.17 XXXX: Not found
  760.     
  761.                 This message is issued while in the 'T'raceback  viewer,  to
  762.              indicate that an address 'XXXX' you have searched for does  not
  763.              occur between your current position, and the start/end  of  the
  764.              traceback buffer.
  765.  
  766.  
  767.  
  768.                           EMILY: An 8051/52 simulator
  769.  
  770.                                TABLE OF CONTENTS
  771.  
  772.  
  773.                                                                          Page
  774.  
  775.      1. INTRODUCTION                                                        1
  776.  
  777.         1.1 System Requirements                                             1
  778.  
  779.      2. STARTING UP EMILY                                                   2
  780.  
  781.  
  782.      3. USING EMILY                                                         4
  783.  
  784.         3.1 The Main Control Panel                                          4
  785.         3.2 The Memory Editor                                              10
  786.         3.3 Hardware Emulation                                             12
  787.         3.4 Messages                                                       14
  788.